package com.cl.service.impl;

import com.alibaba.fastjson.annotation.JSONCreator;
import com.cl.mapper.NoticeMapper;
import com.cl.pojo.Notice;
import com.cl.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    NoticeMapper noticeMapper;
    @Override
    public int insert(Notice notice) {
        return noticeMapper.insert(notice);
    }

    @Override
    public List<Notice> queryAllNotice(String time, int page, int limit) {
        return noticeMapper.queryAllNotice(time, page, limit);
    }

    @Override
    public int countAll() {
        return noticeMapper.countAll();
    }

    @Override
    public int modifyNotice(Notice notice) {
        return noticeMapper.modifyNotice(notice);
    }

    @Override
    public int deleteNotice(int nNo) {
        return noticeMapper.deleteNotice(nNo);
    }
}
